home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / djgpp / emu387 / e56.cc < prev    next >
Encoding:
C/C++ Source or Header  |  1993-11-21  |  472 b   |  21 lines

  1. #include "emu.h"
  2. #include "rmov.h"
  3.  
  4. void emu_56() /* fsave */
  5. {
  6.   void *addr = get_modrm();
  7.   int i, tag_word=0;
  8.  
  9.   status_word = status_word & ~SW_TOP;
  10.   status_word += (top&7) * SW_TOPS;
  11.  
  12.   *(int *)(addr+0) = control_word & 0xffff;
  13.   *(int *)(addr+4) = status_word & 0xffff;
  14.   for (i=0; i<8; i++)
  15.   {
  16.     tag_word |= (st(i).tag << (((i+top)&7)*2));
  17.     r_mov(st(i), (long double *)(addr + 0x1c + i*10));
  18.   }
  19.   *(int *)(addr+8) = tag_word & 0xffff;
  20. }
  21.